export default {
	state: {
		userInfo: {
			visible: false,
			user: null
		},
		fullImage: {
			show: false,
			url: ""
		}
	},
	mutations: {
		showUserInfoBox(state, data) {
			state.userInfo.visible = true;
			state.userInfo.user = data;
		},
		hideUserInfoBox(state) {
			state.userInfo.visible = false;
			state.userInfo.user = null;
		},
		showFullImageBox(state, url) {
			state.fullImage.show = true;
			state.fullImage.url = url;
		},
		closeFullImageBox(state) {
			state.fullImage.show = false;
		},
		updateUserInfoProhibition(state, prohibition) {
			if (state.userInfo.user) {
				state.userInfo.user = {
					...state.userInfo.user,
					prohibition
				};
			}
		}
	}
}